package com.guli.mall.pms.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.guli.common.utils.PageUtils;
import com.guli.mall.pms.entity.AttrEntity;
import com.guli.mall.pms.entity.vo.AttrGroupAndAttrVo;
import com.guli.mall.pms.entity.vo.AttrVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author 罗俊华
 * @email 1007052116@qq.com
 * @date 2020-09-17 11:37:23
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils<AttrVo> queryPage(Integer currentPage, Integer size, AttrEntity attrEntity);

    AttrVo getAttrAndAttrGroupIdById(Long attrId);

    void updateByIdAndUpdateRelation(AttrVo attr);

    void insertAttrAndRelation(AttrVo attr);

    List<AttrEntity> listByIdsAndOtherCondition(List<Long> attrIdList, AttrEntity attrEntity);

    List<AttrEntity> getAttrByCategoryIdAndCondition(Long categoryId, AttrEntity attrEntity);

    /**
     * 根据 categoryId 获取 attrList，再过滤掉那些不需要检索的属性
     * */
    List<AttrEntity> getAttrByCategoryIdAndFilterNonSearchType(Long catalogId);
}

